home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Choice 3
/
Your Choice Software Collection 3.iso
/
docs
/
alias
/
short.al
< prev
Wrap
Text File
|
1994-09-08
|
12KB
|
336 lines
NOTE on this file
The following is an ASCII file containing nothing but
aliases as culled from the thread entitled "My favorite aliases"
appearing in the PCVENB forum, section 10, in August 1994
Attributions appear before each section. No one claims original
authorship, except as may be noted.
----------------------
Sean Fosmire
----------------------
ca copy %1 %2 %3 %4 %5 %6 %7 %8 %9 a\
allows for entry of several filespecs for quick copy to A
sc select /od copy (%2*.*) %1
organizes list of files then allows selection for copying
1st RP is the destination directory
sca select /o-d copy (%1*.*) a\
combines the best of the two above
presents the current files, in reverse chronological order
to permit selection for copying to A
this way, the most recently added or changed files are on top
I also have "sm" and "sma" which do the same thing for the move command
ix dir/djs > index
This produces an ASCII file listing all files in the current directory
and all subdirectories. If run from C\, it will list all files in all
directories, with summary information.
sl select list (%1*.*)
Allows selection of file for use of the 4DOS List command
-------------------------------------------------------------
NOTE on replaceable parameters in aliases
I frequently use the last RP in an alias as the first character
in a wildcard
see examples above and one below
this allows for quick narrowing by filename by entering one or more letters
e.g., with "d" below, enter "d ca" to list all files beginning with "ca"
-------------------------------------------------------------
d dir/jp %1*.*
the "jp" is my preference -- separate extensions, stop display by page
fre free c d e f g j n > c\freedoc ^ type c\freedoc
uses the "free" command to display free space on all current drives
--------------------
Michael Geary
--------------------
Make it easier to type the ALIAS command
al*ias *alias
Edit Aliases
ea edit c\txt\alias.lst
Load Aliases
la ua * ^ alias /r c\txt\alias.lst && echo Aliases loaded
Clear Aliases
ua unalias
List the output of a command
l*cmd (%&) | list /s
This just runs any command and pipes its output to the LIST command. Very
simple, but extremely useful. L MEM /C is a typical use, or even L DIR.
Alternative, to pipe output to a file and then view it
l*cmd (%&) >C\TEMP\LCMD%_shell.LST ^ list C\TEMP\LCMD%_shell.LST
In case I run LCMD in more than one DOS session under Windows, the %_shell
gives a unique file name to each of the "pipe" files. You could use %@unique
for this, but I wanted to be able to pick my own file name.
With the LCMD alias, you could cut FRE down to
fre free c d e f g j n
and type L FRE at the C> prompt. (Or, of course, include the L at the
beginning of the FRE alias itself if you always run it that way.)
Run a program in a specified directory IN <path> <program>
in pushd %1 ^ %2& ^ popd
This replaces all the batch files that wrap PUSHD and POPD around some
program that likes to be run from its own directory.
My last one for now is a variation on this theme. I normally run my DOS
sessions in 50 line mode. A fair number of DOS programs have to run in 25
line mode. Most of those are smart enough to at least switch to thame mode
first, but some are not. They leave my screen in 50 line mode and run in the
top half of the screen, leaving the bottom half with whatever was on it.
Anyone who uses 50 line mode has run into this and may have batch files that
call MODE 80,25 before running such programs and MODE 80,50 after. The easy
way is
in25 mode 80,25 ^ %& ^ mode 80,50
IN25 and IN combine well. To run V Communications' System Commander, I use
scin in25 in c\sc *scin
----------------------
Howard Goldstein
----------------------
This is an alias for the TIME command. If entered with no operands, the date
and time are displayed as with the normal TIME command but the user is not
prompted for a new time. If a parameter is given, the time is set.
Note that this should all be entered on one line and that the caret (^) is
used as the command separator
time iff %#==0 then^keystack enter^*time|echo %@line[con,0]^else^*time %&^endiff
:----------------------
Variation on above
suggested by Mike Bessy
with Howard's addition
:----------------------
May I suggest a variation that doe _not_ require that KSTACK be loaded and can
also be used under OS/2 or NT (with suitable ParameterChar and CommandSep, of
course)
time=iff "%&"=="" then^echo The time is %_time^else^time%&^endiff
:----------------------
Don E. Groves, Jr.
:----------------------
DATER=(dater_date %+ ECHO %_time)
DATER12=(dater_date %+ dater_time ^echo.)
DATER_DATE=
ECHOS %_Dow %@substr[JanFebMarAprMayJunJulAugSepOctNovDec,
%@eval[(%@substr[%_date,0,2]-1)*3],3] %@eval[%@substr[%_date,3,2]],
19%@substr[%_date,6,2]
DATER_TIME=
ECHOS %@substr[12 1 2 3 4 5 6 7 8 91011,
%@eval[%@substr[%_time,0,2] %% 12*2],2]
%@substr[%_time,2,6]
%@substr[AP,%@int[%@eval[%@time[%_time]/3600/12]],1]M
: Notes
(note DATER_DATE and DATER_TIME each go on one long line a piece. -)
They produce the output in the format of
DATER
Tue Aug 23, 1994 002316
and
DATER12
Tue Aug 23, 1994 122403 AM
And yes they are all pipeable to a file or whereever.
:----------------------
Charlie Weesner
:----------------------
My "favorite" three aliases require using NCD (Norton's Change Directory) or
LCD (LED's Change Directory). These programs provide direct navigation from
any level of the directory tree to any other level (including completion of
partial directory names or mis-spellings).
cd=lcd
md=lcd md
rd=lcd rd
If you want to use the original command, rather than the alias, you either
"chdir" or "*cd" where the "*" disables any alias replacement of the
command.
:----------------------
Niels Schaumann
:----------------------
walks back up the directory tree from current location, # levels = # dots
.*........ pushd%0
nothing fancy, just what it says
popd
I've gotten used to these, been using them for a couple of years. I don't
remember who came up with them .... I do remember someone pointing out that
the "multiple dots" weren't supposed to work, but hey ..... they sure do!
:----------------------
Gary M. Berg
:----------------------
; Clear the screen
clear cls white on blue
; Run a command and pipe stdout into LIST
so %& | list/s
; Use a "string" utility to get likely "text" in a file, send it to
; stdout and view it with LIST
inside so string %&
; Reload standard aliases
new_4d*os unalias * ^ alias /r c\cmd\4dos.ali
; Control/T runs MAPMEM
@@ctrl-T mapmem
; Alt-F4 types EXIT - similar to closing a winapp
@@Alt-F4 exit
;
; Directory management utilities. Allow changing to a subdir to run
; a program and then return - will not have changed current directory
; on any drives.
popdir_2
popdir_3
push_xd pushd d ^ pushd
push_xdf pushd d ^ pushd e ^ pushd
push_xe pushd e ^ pushd
; Example of using push and pop routines
alpha*4 push_xde^cd \alpha4^*a4 %&^popdir_3
;
; ACD is a utility a bit like NCD; use it so an invalid command tries
; to change to the command line as a sub-directory.
UNKNOWN_CMD acd %1
:----------------------
Eric Veldhuyzen
:----------------------
You want some nice aliases? How about my dir alias under 4OS2
DIR=iff "%1" eq "" then
^set pad=.
^else set pad=%1
^endiff
^iff exist %pad\descript.ion then
^*dir /A/Z/P/OgE/J %&
^unset pad
^quit
^else
^*dir /T/A/P/OgE/J %&
^unset pad
^quit
^endiff
This of course all on one line, but I cut it for readability.
:----------------------
Anthony Williams
:----------------------
4ED*DIT=select %1 describe (*.*)
@@Shift-F1=so *alias
ADDR*ESS=ks "f%&" 13 %+ list e\mydoc\addr.bk
ALLF*REE=free c %+ free d %+ free e %+ free f %+ free g
ALUP*DATE=pushd c\4dos50 %+ COPY ALIAS.LST ALIAS.%@SUBSTR[%_TIME,4,1
]%@SUBSTR[%_TIME,6,2] /Q %+ alias > alias.lst %+ echo !ALIAS
LIST UPDATED! %+ renew %+ popd %+ beep
DIRARC=dir *.zip;*.arj;*.lzh
DIRBAT=dir *.btm;*.bat
DIRCMD=dir /k *.exe;*.com;*.btm;*.bat
DIREX=dir *.com;*.exe
MEMF=free %+ memory
NOW=echo It is now %_time on %_dow %_date
RENEW=unalias * %+ alias /r c\4dos50\alias.lst %+ echo ALIAS LIST REREAD!
RESETN=unset * %+ set /r c\4dos50\var.lst %+ echo ENVIRONMENTAL VARIABLES
RESET!
SOT*se=%& > %tmp%!tsetmp!.!!! %+ e %tmp%!tsetmp!.!!! %+ del %tmp%!tsetmp!.!!!
TOCP=prompt $p$g %+ set comspec=c\dos\command.com %+ c\dos\command/e2048
%+ c\4dos50\4start %+ set comspec=c\4dos50\4dos.com
Explanation
4ED -- select files for writing Descriptions
ADDR -- calls up my address book in Buerg's LIST and finds the name I have
requested, e.g. "ADDR Smith"
ALUP -- updates my master alias list, but only after making a backup
DIRARC, DIRBAT, DIRCMD, DIREX -- various selective Dir commands
SOT -- puts standard output into my editor via a temp file
TOCP -- when I want to see how hard a time the other 99% of PC users have
it!
:----------------------
Allen Cobb
:----------------------
; Make a directory and move files with same first name into it.
MDF=md %1^move %1.* %1^cd %1
; Remove file from B and copy new version to B.
BDELCOPY=del b%1^copy %1 b
; Quick access to doc, bat, & btm files.
DOC=c\util\list.com c\doc\%1.doc
BAT=c\util\q.exe c\bat\%1.bat
BTM=c\util\q.exe c\bat\%1.btm
; Quick setup for 4DOS aliases, etc. (This may be my favorite.)
S4=c\util\q.exe c\bat\set4dos.bat c\4dos\4dos.ini^c\bat\set4dos.bat
; Directory shortcuts.
CD=*pushd
PD=pushd
BD=popd
H=cd \^cdd c\^cls
; Safety enhancements.
MOVE=*move /r
COPY=*copy /r
DELDIR=echo CAUTION! Removing %1 and all subdirs!^pause^del %1 /sxqy
; Standard calculator alias from docs.
CALC=*set x=%@eval[%&]^echo %x
; PKZIP shorthand.
UZP=select c\util\pkunzip (*.*) d\ %1
LZP=select c\util\pkunzip (*.zip) -vn list /s
AZP=select c\util\pkzip %1 -a %2& [*.*]
; 50,000,000 directory commands.
D=*dir /kmpaou primary DIR command
DB=*dir b /kpaou show drive B
DA=*dir /4kmpvou /aa show everything
D2=*dir /p2ou /v two columns
DD=*dir /4kmpv wide, with sizes
DW=*dir /pouwkmv very wide
DF=*dir /pkmt/a-d/ou just a file list
DC=*dir /kmpaou *.c c source files
DR=*dir /adwkm just directories, very wide
DZ=*dir /su just space info
DZIP=*dir /kmpaou *.zip just zips
DX=except (%%&) *dir /oufp
DDIR=*dir /ad just dirs, listed
DRI=dir yes, I do this too
DIR=*dir /ou default dir
DH=echo D DA DB DD DW DF DC DZ DX DR DDIR DRI DIR